home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume2 / contool3.0 / part06 < prev    next >
Encoding:
Internet Message Format  |  1990-09-25  |  43.4 KB

  1. Path: uunet!lll-winken!sun-barr!rutgers!aramis.rutgers.edu!mcgrew
  2. From: mcgrew@aramis.rutgers.edu (Charles Mcgrew)
  3. Newsgroups: comp.sources.sun
  4. Subject: v02i025:  Contool 3.0, Part06/06
  5. Message-ID: <Sep.25.16.13.38.1990.25634@aramis.rutgers.edu>
  6. Date: 25 Sep 90 20:13:39 GMT
  7. Organization: Rutgers Univ., New Brunswick, N.J.
  8. Lines: 1940
  9. Approved: mcgrew@aramis.rutgers.edu
  10.  
  11. Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
  12. Posting-number: Volume 2, Issue 25
  13. Archive-name: contool3.0/part06
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 6 (of 6)."
  22. # Contents:  contool_ui.c
  23. # Wrapped by chuck@melmac on Fri Aug 17 10:00:54 1990
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'contool_ui.c' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'contool_ui.c'\"
  27. else
  28. echo shar: Extracting \"'contool_ui.c'\" \(40450 characters\)
  29. sed "s/^X//" >'contool_ui.c' <<'END_OF_FILE'
  30. X/*
  31. X * contool_ui.c - User interface object initialization functions.
  32. X * This file was generated by `gxv' from `contool.G'.
  33. X * DO NOT EDIT BY HAND.
  34. X */
  35. X
  36. X#include <stdio.h>
  37. X#include <sys/param.h>
  38. X#include <sys/types.h>
  39. X#include <xview/xview.h>
  40. X#include <xview/canvas.h>
  41. X#include <xview/icon_load.h>
  42. X#include <xview/panel.h>
  43. X#include <xview/scrollbar.h>
  44. X#include <xview/svrimage.h>
  45. X#include <xview/termsw.h>
  46. X#include <xview/text.h>
  47. X#include <xview/tty.h>
  48. X#include <xview/xv_xrect.h>
  49. X#include "contool_ui.h"
  50. X
  51. X/*
  52. X * Create object `file_menu' in the specified instance.
  53. X
  54. X */
  55. XXv_opaque
  56. Xcontool_file_menu_create(ip, owner)
  57. X    caddr_t        *ip;
  58. X    Xv_opaque    owner;
  59. X{
  60. X    extern Menu_item    popup_load_config();
  61. X    extern Menu_item    popup_save_config();
  62. X    extern Menu_item    start_logging();
  63. X    extern Menu_item    stop_logging();
  64. X    extern Menu_item    print_messages();
  65. X    Xv_opaque    obj;
  66. X    
  67. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  68. X        XV_KEY_DATA, INSTANCE, ip,
  69. X        MENU_ITEM,
  70. X            XV_KEY_DATA, INSTANCE, ip,
  71. X            MENU_STRING, "Load Configuration...",
  72. X            MENU_GEN_PROC, popup_load_config,
  73. X            NULL,
  74. X        MENU_ITEM,
  75. X            XV_KEY_DATA, INSTANCE, ip,
  76. X            MENU_STRING, "Save Configuration...",
  77. X            MENU_GEN_PROC, popup_save_config,
  78. X            NULL,
  79. X        MENU_ITEM,
  80. X            XV_KEY_DATA, INSTANCE, ip,
  81. X            MENU_STRING, "Start Logging",
  82. X            MENU_GEN_PROC, start_logging,
  83. X            NULL,
  84. X        MENU_ITEM,
  85. X            XV_KEY_DATA, INSTANCE, ip,
  86. X            MENU_STRING, "Stop Logging",
  87. X            MENU_GEN_PROC, stop_logging,
  88. X            NULL,
  89. X        MENU_ITEM,
  90. X            XV_KEY_DATA, INSTANCE, ip,
  91. X            MENU_STRING, "Print",
  92. X            MENU_GEN_PROC, print_messages,
  93. X            NULL,
  94. X        MENU_DEFAULT, 2,
  95. X        MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "File",
  96. X        NULL);
  97. X    return obj;
  98. X}
  99. X
  100. X/*
  101. X * Create object `view_menu' in the specified instance.
  102. X
  103. X */
  104. XXv_opaque
  105. Xcontool_view_menu_create(ip, owner)
  106. X    caddr_t        *ip;
  107. X    Xv_opaque    owner;
  108. X{
  109. X    extern Menu_item    become_console();
  110. X    extern Menu_item    clear_messages();
  111. X    extern Menu_item    reset_filter();
  112. X    Xv_opaque    obj;
  113. X    
  114. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  115. X        XV_KEY_DATA, INSTANCE, ip,
  116. X        MENU_ITEM,
  117. X            XV_KEY_DATA, INSTANCE, ip,
  118. X            MENU_STRING, "Become Console",
  119. X            MENU_GEN_PROC, become_console,
  120. X            NULL,
  121. X        MENU_ITEM,
  122. X            XV_KEY_DATA, INSTANCE, ip,
  123. X            MENU_STRING, "Clear Messages",
  124. X            MENU_GEN_PROC, clear_messages,
  125. X            NULL,
  126. X        MENU_ITEM,
  127. X            XV_KEY_DATA, INSTANCE, ip,
  128. X            MENU_STRING, "Reset Filter",
  129. X            MENU_GEN_PROC, reset_filter,
  130. X            NULL,
  131. X        MENU_DEFAULT, 2,
  132. X        MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "View",
  133. X        NULL);
  134. X    return obj;
  135. X}
  136. X
  137. X/*
  138. X * Create object `edit_menu' in the specified instance.
  139. X
  140. X */
  141. XXv_opaque
  142. Xcontool_edit_menu_create(ip, owner)
  143. X    caddr_t        *ip;
  144. X    Xv_opaque    owner;
  145. X{
  146. X    extern Menu_item    edit_filters();
  147. X    extern Menu_item    edit_properties();
  148. X    Xv_opaque    obj;
  149. X    
  150. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  151. X        XV_KEY_DATA, INSTANCE, ip,
  152. X        MENU_ITEM,
  153. X            XV_KEY_DATA, INSTANCE, ip,
  154. X            MENU_STRING, "Filters...",
  155. X            MENU_GEN_PROC, edit_filters,
  156. X            NULL,
  157. X        MENU_ITEM,
  158. X            XV_KEY_DATA, INSTANCE, ip,
  159. X            MENU_STRING, "Properties...",
  160. X            MENU_GEN_PROC, edit_properties,
  161. X            NULL,
  162. X        MENU_DEFAULT, 2,
  163. X        MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "Edit",
  164. X        NULL);
  165. X    return obj;
  166. X}
  167. X
  168. X/*
  169. X * Create object `filter_insert_menu' in the specified instance.
  170. X
  171. X */
  172. XXv_opaque
  173. Xcontool_filter_insert_menu_create(ip, owner)
  174. X    caddr_t        *ip;
  175. X    Xv_opaque    owner;
  176. X{
  177. X    extern Menu        filter_insert_handler();
  178. X    extern Menu_item    insert_at_top();
  179. X    extern Menu_item    insert_above();
  180. X    extern Menu_item    insert_below();
  181. X    extern Menu_item    insert_at_bottom();
  182. X    Xv_opaque    obj;
  183. X    
  184. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  185. X        XV_KEY_DATA, INSTANCE, ip,
  186. X        MENU_GEN_PROC, filter_insert_handler,
  187. X        MENU_ITEM,
  188. X            XV_KEY_DATA, INSTANCE, ip,
  189. X            MENU_STRING, "At top",
  190. X            MENU_GEN_PROC, insert_at_top,
  191. X            NULL,
  192. X        MENU_ITEM,
  193. X            XV_KEY_DATA, INSTANCE, ip,
  194. X            MENU_STRING, "Above selection",
  195. X            MENU_GEN_PROC, insert_above,
  196. X            NULL,
  197. X        MENU_ITEM,
  198. X            XV_KEY_DATA, INSTANCE, ip,
  199. X            MENU_STRING, "Below selection",
  200. X            MENU_GEN_PROC, insert_below,
  201. X            NULL,
  202. X        MENU_ITEM,
  203. X            XV_KEY_DATA, INSTANCE, ip,
  204. X            MENU_STRING, "At bottom",
  205. X            MENU_GEN_PROC, insert_at_bottom,
  206. X            NULL,
  207. X        MENU_DEFAULT, 4,
  208. X        NULL);
  209. X    return obj;
  210. X}
  211. X
  212. X/*
  213. X * Create object `filter_edit_menu' in the specified instance.
  214. X
  215. X */
  216. XXv_opaque
  217. Xcontool_filter_edit_menu_create(ip, owner)
  218. X    caddr_t        *ip;
  219. X    Xv_opaque    owner;
  220. X{
  221. X    extern Menu        filter_edit_handler();
  222. X    extern Menu_item    filter_cut();
  223. X    extern Menu_item    filter_copy();
  224. X    extern Menu_item    filter_paste();
  225. X    extern Menu_item    filter_delete();
  226. X    Xv_opaque    obj;
  227. X    
  228. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  229. X        XV_KEY_DATA, INSTANCE, ip,
  230. X        MENU_GEN_PROC, filter_edit_handler,
  231. X        MENU_ITEM,
  232. X            XV_KEY_DATA, INSTANCE, ip,
  233. X            MENU_STRING, "Cut",
  234. X            MENU_GEN_PROC, filter_cut,
  235. X            NULL,
  236. X        MENU_ITEM,
  237. X            XV_KEY_DATA, INSTANCE, ip,
  238. X            MENU_STRING, "Copy",
  239. X            MENU_GEN_PROC, filter_copy,
  240. X            NULL,
  241. X        MENU_ITEM,
  242. X            XV_KEY_DATA, INSTANCE, ip,
  243. X            MENU_STRING, "Paste",
  244. X            MENU_GEN_PROC, filter_paste,
  245. X            MENU_PULLRIGHT, contool_filter_paste_menu_create(ip, NULL),
  246. X            NULL,
  247. X        MENU_ITEM,
  248. X            XV_KEY_DATA, INSTANCE, ip,
  249. X            MENU_STRING, "Delete",
  250. X            MENU_GEN_PROC, filter_delete,
  251. X            NULL,
  252. X        MENU_DEFAULT, 1,
  253. X        NULL);
  254. X    return obj;
  255. X}
  256. X
  257. X/*
  258. X * Create object `filter_paste_menu' in the specified instance.
  259. X
  260. X */
  261. XXv_opaque
  262. Xcontool_filter_paste_menu_create(ip, owner)
  263. X    caddr_t        *ip;
  264. X    Xv_opaque    owner;
  265. X{
  266. X    extern Menu_item    paste_at_top();
  267. X    extern Menu_item    paste_above();
  268. X    extern Menu_item    paste_below();
  269. X    extern Menu_item    paste_at_bottom();
  270. X    Xv_opaque    obj;
  271. X    
  272. X    obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
  273. X        XV_KEY_DATA, INSTANCE, ip,
  274. X        MENU_ITEM,
  275. X            XV_KEY_DATA, INSTANCE, ip,
  276. X            MENU_STRING, "At top",
  277. X            MENU_GEN_PROC, paste_at_top,
  278. X            NULL,
  279. X        MENU_ITEM,
  280. X            XV_KEY_DATA, INSTANCE, ip,
  281. X            MENU_STRING, "Above selection",
  282. X            MENU_GEN_PROC, paste_above,
  283. X            NULL,
  284. X        MENU_ITEM,
  285. X            XV_KEY_DATA, INSTANCE, ip,
  286. X            MENU_STRING, "Below selection",
  287. X            MENU_GEN_PROC, paste_below,
  288. X            NULL,
  289. X        MENU_ITEM,
  290. X            XV_KEY_DATA, INSTANCE, ip,
  291. X            MENU_STRING, "At bottom",
  292. X            MENU_GEN_PROC, paste_at_bottom,
  293. X            NULL,
  294. X        MENU_DEFAULT, 4,
  295. X        NULL);
  296. X    return obj;
  297. X}
  298. X
  299. X/*
  300. X * Initialize an instance of object `base'.
  301. X */
  302. Xcontool_base_objects *
  303. Xcontool_base_objects_initialize(ip, owner)
  304. X    contool_base_objects    *ip;
  305. X    Xv_opaque    owner;
  306. X{
  307. X    if (!ip && !(ip = (contool_base_objects *) calloc(1, sizeof (contool_base_objects))))
  308. X        return (contool_base_objects *) NULL;
  309. X    if (!ip->base)
  310. X        ip->base = contool_base_base_create(ip, owner);
  311. X    if (!ip->contool_controls)
  312. X        ip->contool_controls = contool_base_contool_controls_create(ip, ip->base);
  313. X    if (!ip->file)
  314. X        ip->file = contool_base_file_create(ip, ip->contool_controls);
  315. X    if (!ip->view)
  316. X        ip->view = contool_base_view_create(ip, ip->contool_controls);
  317. X    if (!ip->edit)
  318. X        ip->edit = contool_base_edit_create(ip, ip->contool_controls);
  319. X    if (!ip->display)
  320. X        ip->display = contool_base_display_create(ip, ip->base);
  321. X    return ip;
  322. X}
  323. X
  324. X/*
  325. X * Create object `base' in the specified instance.
  326. X
  327. X */
  328. XXv_opaque
  329. Xcontool_base_base_create(ip, owner)
  330. X    caddr_t        ip;
  331. X    Xv_opaque    owner;
  332. X{
  333. X    Xv_opaque    obj;
  334. X    
  335. X    obj = xv_create(owner, FRAME,
  336. X        XV_KEY_DATA, INSTANCE, ip,
  337. X        XV_WIDTH, 575,
  338. X        XV_HEIGHT, 246,
  339. X        XV_LABEL, "Contool 3.0",
  340. X        FRAME_CLOSED, FALSE,
  341. X        FRAME_SHOW_FOOTER, TRUE,
  342. X        FRAME_SHOW_RESIZE_CORNER, TRUE,
  343. X        NULL);
  344. X    return obj;
  345. X}
  346. X
  347. X/*
  348. X * Create object `contool_controls' in the specified instance.
  349. X
  350. X */
  351. XXv_opaque
  352. Xcontool_base_contool_controls_create(ip, owner)
  353. X    caddr_t        ip;
  354. X    Xv_opaque    owner;
  355. X{
  356. X    Xv_opaque    obj;
  357. X    
  358. X    obj = xv_create(owner, PANEL,
  359. X        XV_KEY_DATA, INSTANCE, ip,
  360. X        XV_HELP_DATA, "contool:contool_controls",
  361. X        XV_X, 0,
  362. X        XV_Y, 0,
  363. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  364. X        XV_HEIGHT, 32,
  365. X        WIN_BORDER, FALSE,
  366. X        NULL);
  367. X    return obj;
  368. X}
  369. X
  370. X/*
  371. X * Create object `file' in the specified instance.
  372. X
  373. X */
  374. XXv_opaque
  375. Xcontool_base_file_create(ip, owner)
  376. X    caddr_t        ip;
  377. X    Xv_opaque    owner;
  378. X{
  379. X    Xv_opaque    obj;
  380. X    
  381. X    obj = xv_create(owner, PANEL_BUTTON,
  382. X        XV_KEY_DATA, INSTANCE, ip,
  383. X        XV_HELP_DATA, "contool:file",
  384. X        XV_X, 4,
  385. X        XV_Y, 4,
  386. X        XV_WIDTH, 54,
  387. X        XV_HEIGHT, 20,
  388. X        PANEL_LABEL_STRING, "File",
  389. X        PANEL_ITEM_MENU, contool_file_menu_create((caddr_t *) ip, NULL),
  390. X        NULL);
  391. X    return obj;
  392. X}
  393. X
  394. X/*
  395. X * Create object `view' in the specified instance.
  396. X
  397. X */
  398. XXv_opaque
  399. Xcontool_base_view_create(ip, owner)
  400. X    caddr_t        ip;
  401. X    Xv_opaque    owner;
  402. X{
  403. X    Xv_opaque    obj;
  404. X    
  405. X    obj = xv_create(owner, PANEL_BUTTON,
  406. X        XV_KEY_DATA, INSTANCE, ip,
  407. X        XV_HELP_DATA, "contool:view",
  408. X        XV_X, 67,
  409. X        XV_Y, 4,
  410. X        XV_WIDTH, 62,
  411. X        XV_HEIGHT, 20,
  412. X        PANEL_LABEL_STRING, "View",
  413. X        PANEL_ITEM_MENU, contool_view_menu_create((caddr_t *) ip, NULL),
  414. X        NULL);
  415. X    return obj;
  416. X}
  417. X
  418. X/*
  419. X * Create object `edit' in the specified instance.
  420. X
  421. X */
  422. XXv_opaque
  423. Xcontool_base_edit_create(ip, owner)
  424. X    caddr_t        ip;
  425. X    Xv_opaque    owner;
  426. X{
  427. X    Xv_opaque    obj;
  428. X    
  429. X    obj = xv_create(owner, PANEL_BUTTON,
  430. X        XV_KEY_DATA, INSTANCE, ip,
  431. X        XV_HELP_DATA, "contool:edit",
  432. X        XV_X, 138,
  433. X        XV_Y, 4,
  434. X        XV_WIDTH, 56,
  435. X        XV_HEIGHT, 20,
  436. X        PANEL_LABEL_STRING, "Edit",
  437. X        PANEL_ITEM_MENU, contool_edit_menu_create((caddr_t *) ip, NULL),
  438. X        NULL);
  439. X    return obj;
  440. X}
  441. X
  442. X/*
  443. X * Create object `display' in the specified instance.
  444. X
  445. X */
  446. XXv_opaque
  447. Xcontool_base_display_create(ip, owner)
  448. X    caddr_t        ip;
  449. X    Xv_opaque    owner;
  450. X{
  451. X    Xv_opaque    obj;
  452. X    
  453. X    obj = xv_create(owner, TEXTSW,
  454. X        XV_KEY_DATA, INSTANCE, ip,
  455. X        XV_HELP_DATA, "contool:display",
  456. X        XV_X, 0,
  457. X        XV_Y, 27,
  458. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  459. X        XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  460. X        OPENWIN_SHOW_BORDERS, TRUE,
  461. X        NULL);
  462. X    return obj;
  463. X}
  464. X
  465. X/*
  466. X * Initialize an instance of object `props'.
  467. X */
  468. Xcontool_props_objects *
  469. Xcontool_props_objects_initialize(ip, owner)
  470. X    contool_props_objects    *ip;
  471. X    Xv_opaque    owner;
  472. X{
  473. X    if (!ip && !(ip = (contool_props_objects *) calloc(1, sizeof (contool_props_objects))))
  474. X        return (contool_props_objects *) NULL;
  475. X    if (!ip->props)
  476. X        ip->props = contool_props_props_create(ip, owner);
  477. X    if (!ip->prop_controls)
  478. X        ip->prop_controls = contool_props_prop_controls_create(ip, ip->props);
  479. X    if (!ip->default_action)
  480. X        ip->default_action = contool_props_default_action_create(ip, ip->prop_controls);
  481. X    if (!ip->default_beep_count)
  482. X        ip->default_beep_count = contool_props_default_beep_count_create(ip, ip->prop_controls);
  483. X    if (!ip->default_beep_times)
  484. X        ip->default_beep_times = contool_props_default_beep_times_create(ip, ip->prop_controls);
  485. X    if (!ip->default_command)
  486. X        ip->default_command = contool_props_default_command_create(ip, ip->prop_controls);
  487. X    if (!ip->log_file)
  488. X        ip->log_file = contool_props_log_file_create(ip, ip->prop_controls);
  489. X    if (!ip->log_style)
  490. X        ip->log_style = contool_props_log_style_create(ip, ip->prop_controls);
  491. X    if (!ip->print_filter)
  492. X        ip->print_filter = contool_props_print_filter_create(ip, ip->prop_controls);
  493. X    if (!ip->good_icon)
  494. X        ip->good_icon = contool_props_good_icon_create(ip, ip->prop_controls);
  495. X    if (!ip->bad_icon)
  496. X        ip->bad_icon = contool_props_bad_icon_create(ip, ip->prop_controls);
  497. X    if (!ip->flash_icon)
  498. X        ip->flash_icon = contool_props_flash_icon_create(ip, ip->prop_controls);
  499. X    if (!ip->stamp_resolution)
  500. X        ip->stamp_resolution = contool_props_stamp_resolution_create(ip, ip->prop_controls);
  501. X    if (!ip->message2)
  502. X        ip->message2 = contool_props_message2_create(ip, ip->prop_controls);
  503. X    if (!ip->max_message)
  504. X        ip->max_message = contool_props_max_message_create(ip, ip->prop_controls);
  505. X    if (!ip->message3)
  506. X        ip->message3 = contool_props_message3_create(ip, ip->prop_controls);
  507. X    if (!ip->delete_amount)
  508. X        ip->delete_amount = contool_props_delete_amount_create(ip, ip->prop_controls);
  509. X    if (!ip->message4)
  510. X        ip->message4 = contool_props_message4_create(ip, ip->prop_controls);
  511. X    if (!ip->props_apply)
  512. X        ip->props_apply = contool_props_props_apply_create(ip, ip->prop_controls);
  513. X    if (!ip->props_reset)
  514. X        ip->props_reset = contool_props_props_reset_create(ip, ip->prop_controls);
  515. X    return ip;
  516. X}
  517. X
  518. X/*
  519. X * Create object `props' in the specified instance.
  520. X
  521. X */
  522. XXv_opaque
  523. Xcontool_props_props_create(ip, owner)
  524. X    caddr_t        ip;
  525. X    Xv_opaque    owner;
  526. X{
  527. X    Xv_opaque    obj;
  528. X    
  529. X    obj = xv_create(owner, FRAME_CMD,
  530. X        XV_KEY_DATA, INSTANCE, ip,
  531. X        XV_WIDTH, 500,
  532. X        XV_HEIGHT, 479,
  533. X        XV_LABEL, "Contool: Properties",
  534. X        XV_SHOW, FALSE,
  535. X        FRAME_SHOW_FOOTER, FALSE,
  536. X        FRAME_SHOW_RESIZE_CORNER, FALSE,
  537. X        FRAME_CMD_PUSHPIN_IN, FALSE,
  538. X        NULL);
  539. X    xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
  540. X    return obj;
  541. X}
  542. X
  543. X/*
  544. X * Create object `prop_controls' in the specified instance.
  545. X
  546. X */
  547. XXv_opaque
  548. Xcontool_props_prop_controls_create(ip, owner)
  549. X    caddr_t        ip;
  550. X    Xv_opaque    owner;
  551. X{
  552. X    Xv_opaque    obj;
  553. X    
  554. X    obj = xv_create(owner, PANEL,
  555. X        XV_KEY_DATA, INSTANCE, ip,
  556. X        XV_HELP_DATA, "contool:prop_controls",
  557. X        XV_X, 0,
  558. X        XV_Y, 0,
  559. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  560. X        XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  561. X        WIN_BORDER, FALSE,
  562. X        NULL);
  563. X    return obj;
  564. X}
  565. X
  566. X/*
  567. X * Create object `default_action' in the specified instance.
  568. X
  569. X */
  570. XXv_opaque
  571. Xcontool_props_default_action_create(ip, owner)
  572. X    caddr_t        ip;
  573. X    Xv_opaque    owner;
  574. X{
  575. X    extern int        default_action();
  576. X    Xv_opaque    obj;
  577. X    
  578. X    obj = xv_create(owner, PANEL_TOGGLE,
  579. X        XV_KEY_DATA, INSTANCE, ip,
  580. X        XV_HELP_DATA, "contool:default_action",
  581. X        XV_X, 96,
  582. X        XV_Y, 14,
  583. X        XV_WIDTH, 211,
  584. X        XV_HEIGHT, 139,
  585. X        PANEL_VALUE_X, 205,
  586. X        PANEL_VALUE_Y, 14,
  587. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  588. X        PANEL_CHOICE_NCOLS, 1,
  589. X        PANEL_LABEL_STRING, "Default action:",
  590. X        PANEL_NOTIFY_PROC, default_action,
  591. X        PANEL_CHOICE_STRINGS,
  592. X            "Beep",
  593. X            "Command",
  594. X            "Flash icon",
  595. X            "Open window",
  596. X            "Timestamp",
  597. X            0,
  598. X        NULL);
  599. X    return obj;
  600. X}
  601. X
  602. X/*
  603. X * Create object `default_beep_count' in the specified instance.
  604. X
  605. X */
  606. XXv_opaque
  607. Xcontool_props_default_beep_count_create(ip, owner)
  608. X    caddr_t        ip;
  609. X    Xv_opaque    owner;
  610. X{
  611. X    Xv_opaque    obj;
  612. X    
  613. X    obj = xv_create(owner, PANEL_NUMERIC_TEXT,
  614. X        XV_KEY_DATA, INSTANCE, ip,
  615. X        XV_HELP_DATA, "contool:default_beep_count",
  616. X        XV_X, 306,
  617. X        XV_Y, 19,
  618. X        XV_WIDTH, 80,
  619. X        XV_HEIGHT, 15,
  620. X        PANEL_VALUE_X, 315,
  621. X        PANEL_VALUE_Y, 19,
  622. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  623. X        PANEL_VALUE_DISPLAY_LENGTH, 2,
  624. X        PANEL_VALUE_STORED_LENGTH, 2,
  625. X        PANEL_MAX_VALUE, 99,
  626. X        PANEL_MIN_VALUE, 0,
  627. X        PANEL_READ_ONLY, FALSE,
  628. X        NULL);
  629. X    return obj;
  630. X}
  631. X
  632. X/*
  633. X * Create object `default_beep_times' in the specified instance.
  634. X
  635. X */
  636. XXv_opaque
  637. Xcontool_props_default_beep_times_create(ip, owner)
  638. X    caddr_t        ip;
  639. X    Xv_opaque    owner;
  640. X{
  641. X    Xv_opaque    obj;
  642. X    
  643. X    obj = xv_create(owner, PANEL_MESSAGE,
  644. X        XV_KEY_DATA, INSTANCE, ip,
  645. X        XV_HELP_DATA, "contool:default_beep_times",
  646. X        XV_X, 394,
  647. X        XV_Y, 19,
  648. X        XV_WIDTH, 34,
  649. X        XV_HEIGHT, 13,
  650. X        PANEL_LABEL_STRING, "times",
  651. X        PANEL_LABEL_BOLD, FALSE,
  652. X        NULL);
  653. X    return obj;
  654. X}
  655. X
  656. X/*
  657. X * Create object `default_command' in the specified instance.
  658. X
  659. X */
  660. XXv_opaque
  661. Xcontool_props_default_command_create(ip, owner)
  662. X    caddr_t        ip;
  663. X    Xv_opaque    owner;
  664. X{
  665. X    Xv_opaque    obj;
  666. X    
  667. X    obj = xv_create(owner, PANEL_TEXT,
  668. X        XV_KEY_DATA, INSTANCE, ip,
  669. X        XV_HELP_DATA, "contool:default_command",
  670. X        XV_X, 306,
  671. X        XV_Y, 48,
  672. X        XV_WIDTH, 177,
  673. X        XV_HEIGHT, 15,
  674. X        PANEL_VALUE_X, 315,
  675. X        PANEL_VALUE_Y, 48,
  676. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  677. X        PANEL_VALUE_DISPLAY_LENGTH, 21,
  678. X        PANEL_VALUE_STORED_LENGTH, 1024,
  679. X        PANEL_READ_ONLY, FALSE,
  680. X        NULL);
  681. X    return obj;
  682. X}
  683. X
  684. X/*
  685. X * Create object `log_file' in the specified instance.
  686. X
  687. X */
  688. XXv_opaque
  689. Xcontool_props_log_file_create(ip, owner)
  690. X    caddr_t        ip;
  691. X    Xv_opaque    owner;
  692. X{
  693. X    extern Panel_setting    file_completion();
  694. X    Xv_opaque    obj;
  695. X    
  696. X    obj = xv_create(owner, PANEL_TEXT,
  697. X        XV_KEY_DATA, INSTANCE, ip,
  698. X        XV_HELP_DATA, "contool:log_file",
  699. X        XV_X, 141,
  700. X        XV_Y, 174,
  701. X        XV_WIDTH, 344,
  702. X        XV_HEIGHT, 15,
  703. X        PANEL_LABEL_STRING, "Log file:",
  704. X        PANEL_VALUE_X, 205,
  705. X        PANEL_VALUE_Y, 174,
  706. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  707. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  708. X        PANEL_VALUE_STORED_LENGTH, 256,
  709. X        PANEL_READ_ONLY, FALSE,
  710. X        PANEL_NOTIFY_PROC, file_completion,
  711. X        NULL);
  712. X    return obj;
  713. X}
  714. X
  715. X/*
  716. X * Create object `log_style' in the specified instance.
  717. X
  718. X */
  719. XXv_opaque
  720. Xcontool_props_log_style_create(ip, owner)
  721. X    caddr_t        ip;
  722. X    Xv_opaque    owner;
  723. X{
  724. X    Xv_opaque    obj;
  725. X    
  726. X    obj = xv_create(owner, PANEL_CHOICE,
  727. X        XV_KEY_DATA, INSTANCE, ip,
  728. X        XV_HELP_DATA, "contool:log_style",
  729. X        XV_X, 96,
  730. X        XV_Y, 194,
  731. X        XV_WIDTH, 314,
  732. X        XV_HEIGHT, 23,
  733. X        PANEL_VALUE_X, 205,
  734. X        PANEL_VALUE_Y, 194,
  735. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  736. X        PANEL_CHOICE_NROWS, 1,
  737. X        PANEL_LABEL_STRING, "Log messages:",
  738. X        PANEL_CHOICE_STRINGS,
  739. X            "Before filtering",
  740. X            "After filtering",
  741. X            0,
  742. X        NULL);
  743. X    return obj;
  744. X}
  745. X
  746. X/*
  747. X * Create object `print_filter' in the specified instance.
  748. X
  749. X */
  750. XXv_opaque
  751. Xcontool_props_print_filter_create(ip, owner)
  752. X    caddr_t        ip;
  753. X    Xv_opaque    owner;
  754. X{
  755. X    Xv_opaque    obj;
  756. X    
  757. X    obj = xv_create(owner, PANEL_TEXT,
  758. X        XV_KEY_DATA, INSTANCE, ip,
  759. X        XV_HELP_DATA, "contool:print_filter",
  760. X        XV_X, 119,
  761. X        XV_Y, 237,
  762. X        XV_WIDTH, 364,
  763. X        XV_HEIGHT, 15,
  764. X        PANEL_LABEL_STRING, "Print filter:",
  765. X        PANEL_VALUE_X, 203,
  766. X        PANEL_VALUE_Y, 237,
  767. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  768. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  769. X        PANEL_VALUE_STORED_LENGTH, 256,
  770. X        PANEL_READ_ONLY, FALSE,
  771. X        NULL);
  772. X    return obj;
  773. X}
  774. X
  775. X/*
  776. X * Create object `good_icon' in the specified instance.
  777. X
  778. X */
  779. XXv_opaque
  780. Xcontool_props_good_icon_create(ip, owner)
  781. X    caddr_t        ip;
  782. X    Xv_opaque    owner;
  783. X{
  784. X    extern Panel_setting    file_completion();
  785. X    Xv_opaque    obj;
  786. X    
  787. X    obj = xv_create(owner, PANEL_TEXT,
  788. X        XV_KEY_DATA, INSTANCE, ip,
  789. X        XV_HELP_DATA, "contool:good_icon",
  790. X        XV_X, 79,
  791. X        XV_Y, 274,
  792. X        XV_WIDTH, 406,
  793. X        XV_HEIGHT, 15,
  794. X        PANEL_LABEL_STRING, "\"All is well\" icon:",
  795. X        PANEL_VALUE_X, 205,
  796. X        PANEL_VALUE_Y, 274,
  797. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  798. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  799. X        PANEL_VALUE_STORED_LENGTH, 256,
  800. X        PANEL_READ_ONLY, FALSE,
  801. X        PANEL_NOTIFY_PROC, file_completion,
  802. X        NULL);
  803. X    return obj;
  804. X}
  805. X
  806. X/*
  807. X * Create object `bad_icon' in the specified instance.
  808. X
  809. X */
  810. XXv_opaque
  811. Xcontool_props_bad_icon_create(ip, owner)
  812. X    caddr_t        ip;
  813. X    Xv_opaque    owner;
  814. X{
  815. X    extern Panel_setting    file_completion();
  816. X    Xv_opaque    obj;
  817. X    
  818. X    obj = xv_create(owner, PANEL_TEXT,
  819. X        XV_KEY_DATA, INSTANCE, ip,
  820. X        XV_HELP_DATA, "contool:bad_icon",
  821. X        XV_X, 50,
  822. X        XV_Y, 294,
  823. X        XV_WIDTH, 435,
  824. X        XV_HEIGHT, 15,
  825. X        PANEL_LABEL_STRING, "\"Check console\" icon:",
  826. X        PANEL_VALUE_X, 205,
  827. X        PANEL_VALUE_Y, 294,
  828. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  829. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  830. X        PANEL_VALUE_STORED_LENGTH, 256,
  831. X        PANEL_READ_ONLY, FALSE,
  832. X        PANEL_NOTIFY_PROC, file_completion,
  833. X        NULL);
  834. X    return obj;
  835. X}
  836. X
  837. X/*
  838. X * Create object `flash_icon' in the specified instance.
  839. X
  840. X */
  841. XXv_opaque
  842. Xcontool_props_flash_icon_create(ip, owner)
  843. X    caddr_t        ip;
  844. X    Xv_opaque    owner;
  845. X{
  846. X    extern Panel_setting    file_completion();
  847. X    Xv_opaque    obj;
  848. X    
  849. X    obj = xv_create(owner, PANEL_TEXT,
  850. X        XV_KEY_DATA, INSTANCE, ip,
  851. X        XV_HELP_DATA, "contool:flash_icon",
  852. X        XV_X, 111,
  853. X        XV_Y, 314,
  854. X        XV_WIDTH, 374,
  855. X        XV_HEIGHT, 15,
  856. X        PANEL_LABEL_STRING, "\"Flash\" icon:",
  857. X        PANEL_VALUE_X, 205,
  858. X        PANEL_VALUE_Y, 314,
  859. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  860. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  861. X        PANEL_VALUE_STORED_LENGTH, 256,
  862. X        PANEL_READ_ONLY, FALSE,
  863. X        PANEL_NOTIFY_PROC, file_completion,
  864. X        NULL);
  865. X    return obj;
  866. X}
  867. X
  868. X/*
  869. X * Create object `stamp_resolution' in the specified instance.
  870. X
  871. X */
  872. XXv_opaque
  873. Xcontool_props_stamp_resolution_create(ip, owner)
  874. X    caddr_t        ip;
  875. X    Xv_opaque    owner;
  876. X{
  877. X    Xv_opaque    obj;
  878. X    
  879. X    obj = xv_create(owner, PANEL_NUMERIC_TEXT,
  880. X        XV_KEY_DATA, INSTANCE, ip,
  881. X        XV_HELP_DATA, "contool:stamp_resolution",
  882. X        XV_X, 40,
  883. X        XV_Y, 350,
  884. X        XV_WIDTH, 246,
  885. X        XV_HEIGHT, 15,
  886. X        PANEL_LABEL_STRING, "Timestamp resolution:",
  887. X        PANEL_VALUE_X, 205,
  888. X        PANEL_VALUE_Y, 350,
  889. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  890. X        PANEL_VALUE_DISPLAY_LENGTH, 6,
  891. X        PANEL_VALUE_STORED_LENGTH, 6,
  892. X        PANEL_MAX_VALUE, 999,
  893. X        PANEL_MIN_VALUE, 0,
  894. X        PANEL_READ_ONLY, FALSE,
  895. X        NULL);
  896. X    return obj;
  897. X}
  898. X
  899. X/*
  900. X * Create object `message2' in the specified instance.
  901. X
  902. X */
  903. XXv_opaque
  904. Xcontool_props_message2_create(ip, owner)
  905. X    caddr_t        ip;
  906. X    Xv_opaque    owner;
  907. X{
  908. X    Xv_opaque    obj;
  909. X    
  910. X    obj = xv_create(owner, PANEL_MESSAGE,
  911. X        XV_KEY_DATA, INSTANCE, ip,
  912. X        XV_HELP_DATA, "contool:message2",
  913. X        XV_X, 296,
  914. X        XV_Y, 350,
  915. X        XV_WIDTH, 48,
  916. X        XV_HEIGHT, 13,
  917. X        PANEL_LABEL_STRING, "seconds",
  918. X        PANEL_LABEL_BOLD, FALSE,
  919. X        NULL);
  920. X    return obj;
  921. X}
  922. X
  923. X/*
  924. X * Create object `max_message' in the specified instance.
  925. X
  926. X */
  927. XXv_opaque
  928. Xcontool_props_max_message_create(ip, owner)
  929. X    caddr_t        ip;
  930. X    Xv_opaque    owner;
  931. X{
  932. X    Xv_opaque    obj;
  933. X    
  934. X    obj = xv_create(owner, PANEL_NUMERIC_TEXT,
  935. X        XV_KEY_DATA, INSTANCE, ip,
  936. X        XV_HELP_DATA, "contool:max_message",
  937. X        XV_X, 32,
  938. X        XV_Y, 386,
  939. X        XV_WIDTH, 254,
  940. X        XV_HEIGHT, 15,
  941. X        PANEL_LABEL_STRING, "Maximum message text:",
  942. X        PANEL_VALUE_X, 205,
  943. X        PANEL_VALUE_Y, 386,
  944. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  945. X        PANEL_VALUE_DISPLAY_LENGTH, 6,
  946. X        PANEL_VALUE_STORED_LENGTH, 6,
  947. X        PANEL_MAX_VALUE, 999999,
  948. X        PANEL_MIN_VALUE, 0,
  949. X        PANEL_READ_ONLY, FALSE,
  950. X        NULL);
  951. X    return obj;
  952. X}
  953. X
  954. X/*
  955. X * Create object `message3' in the specified instance.
  956. X
  957. X */
  958. XXv_opaque
  959. Xcontool_props_message3_create(ip, owner)
  960. X    caddr_t        ip;
  961. X    Xv_opaque    owner;
  962. X{
  963. X    Xv_opaque    obj;
  964. X    
  965. X    obj = xv_create(owner, PANEL_MESSAGE,
  966. X        XV_KEY_DATA, INSTANCE, ip,
  967. X        XV_HELP_DATA, "contool:message3",
  968. X        XV_X, 295,
  969. X        XV_Y, 386,
  970. X        XV_WIDTH, 33,
  971. X        XV_HEIGHT, 13,
  972. X        PANEL_LABEL_STRING, "bytes",
  973. X        PANEL_LABEL_BOLD, FALSE,
  974. X        NULL);
  975. X    return obj;
  976. X}
  977. X
  978. X/*
  979. X * Create object `delete_amount' in the specified instance.
  980. X
  981. X */
  982. XXv_opaque
  983. Xcontool_props_delete_amount_create(ip, owner)
  984. X    caddr_t        ip;
  985. X    Xv_opaque    owner;
  986. X{
  987. X    Xv_opaque    obj;
  988. X    
  989. X    obj = xv_create(owner, PANEL_NUMERIC_TEXT,
  990. X        XV_KEY_DATA, INSTANCE, ip,
  991. X        XV_HELP_DATA, "contool:delete_amount",
  992. X        XV_X, 14,
  993. X        XV_Y, 406,
  994. X        XV_WIDTH, 272,
  995. X        XV_HEIGHT, 15,
  996. X        PANEL_LABEL_STRING, "Overflow deletion amount:",
  997. X        PANEL_VALUE_X, 205,
  998. X        PANEL_VALUE_Y, 406,
  999. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1000. X        PANEL_VALUE_DISPLAY_LENGTH, 6,
  1001. X        PANEL_VALUE_STORED_LENGTH, 6,
  1002. X        PANEL_MAX_VALUE, 999999,
  1003. X        PANEL_MIN_VALUE, 0,
  1004. X        PANEL_READ_ONLY, FALSE,
  1005. X        NULL);
  1006. X    return obj;
  1007. X}
  1008. X
  1009. X/*
  1010. X * Create object `message4' in the specified instance.
  1011. X
  1012. X */
  1013. XXv_opaque
  1014. Xcontool_props_message4_create(ip, owner)
  1015. X    caddr_t        ip;
  1016. X    Xv_opaque    owner;
  1017. X{
  1018. X    Xv_opaque    obj;
  1019. X    
  1020. X    obj = xv_create(owner, PANEL_MESSAGE,
  1021. X        XV_KEY_DATA, INSTANCE, ip,
  1022. X        XV_HELP_DATA, "contool:message4",
  1023. X        XV_X, 295,
  1024. X        XV_Y, 406,
  1025. X        XV_WIDTH, 33,
  1026. X        XV_HEIGHT, 13,
  1027. X        PANEL_LABEL_STRING, "bytes",
  1028. X        PANEL_LABEL_BOLD, FALSE,
  1029. X        NULL);
  1030. X    return obj;
  1031. X}
  1032. X
  1033. X/*
  1034. X * Create object `props_apply' in the specified instance.
  1035. X
  1036. X */
  1037. XXv_opaque
  1038. Xcontool_props_props_apply_create(ip, owner)
  1039. X    caddr_t        ip;
  1040. X    Xv_opaque    owner;
  1041. X{
  1042. X    extern void        accept_properties();
  1043. X    Xv_opaque    obj;
  1044. X    
  1045. X    obj = xv_create(owner, PANEL_BUTTON,
  1046. X        XV_KEY_DATA, INSTANCE, ip,
  1047. X        XV_HELP_DATA, "contool:props_apply",
  1048. X        XV_X, 191,
  1049. X        XV_Y, 442,
  1050. X        XV_WIDTH, 53,
  1051. X        XV_HEIGHT, 20,
  1052. X        PANEL_LABEL_STRING, "Apply",
  1053. X        PANEL_NOTIFY_PROC, accept_properties,
  1054. X        NULL);
  1055. X    return obj;
  1056. X}
  1057. X
  1058. X/*
  1059. X * Create object `props_reset' in the specified instance.
  1060. X
  1061. X */
  1062. XXv_opaque
  1063. Xcontool_props_props_reset_create(ip, owner)
  1064. X    caddr_t        ip;
  1065. X    Xv_opaque    owner;
  1066. X{
  1067. X    extern void        reset_properties();
  1068. X    Xv_opaque    obj;
  1069. X    
  1070. X    obj = xv_create(owner, PANEL_BUTTON,
  1071. X        XV_KEY_DATA, INSTANCE, ip,
  1072. X        XV_HELP_DATA, "contool:props_reset",
  1073. X        XV_X, 256,
  1074. X        XV_Y, 442,
  1075. X        XV_WIDTH, 51,
  1076. X        XV_HEIGHT, 20,
  1077. X        PANEL_LABEL_STRING, "Reset",
  1078. X        PANEL_NOTIFY_PROC, reset_properties,
  1079. X        NULL);
  1080. X    return obj;
  1081. X}
  1082. X
  1083. X/*
  1084. X * Initialize an instance of object `filters'.
  1085. X */
  1086. Xcontool_filters_objects *
  1087. Xcontool_filters_objects_initialize(ip, owner)
  1088. X    contool_filters_objects    *ip;
  1089. X    Xv_opaque    owner;
  1090. X{
  1091. X    if (!ip && !(ip = (contool_filters_objects *) calloc(1, sizeof (contool_filters_objects))))
  1092. X        return (contool_filters_objects *) NULL;
  1093. X    if (!ip->filters)
  1094. X        ip->filters = contool_filters_filters_create(ip, owner);
  1095. X    if (!ip->filter_controls)
  1096. X        ip->filter_controls = contool_filters_filter_controls_create(ip, ip->filters);
  1097. X    if (!ip->filter_list)
  1098. X        ip->filter_list = contool_filters_filter_list_create(ip, ip->filter_controls);
  1099. X    if (!ip->filter_insert)
  1100. X        ip->filter_insert = contool_filters_filter_insert_create(ip, ip->filter_controls);
  1101. X    if (!ip->filter_edit)
  1102. X        ip->filter_edit = contool_filters_filter_edit_create(ip, ip->filter_controls);
  1103. X    if (!ip->filter_update)
  1104. X        ip->filter_update = contool_filters_filter_update_create(ip, ip->filter_controls);
  1105. X    if (!ip->filter_type)
  1106. X        ip->filter_type = contool_filters_filter_type_create(ip, ip->filter_controls);
  1107. X    if (!ip->start)
  1108. X        ip->start = contool_filters_start_create(ip, ip->filter_controls);
  1109. X    if (!ip->stop)
  1110. X        ip->stop = contool_filters_stop_create(ip, ip->filter_controls);
  1111. X    if (!ip->comment)
  1112. X        ip->comment = contool_filters_comment_create(ip, ip->filter_controls);
  1113. X    if (!ip->ignore)
  1114. X        ip->ignore = contool_filters_ignore_create(ip, ip->filter_controls);
  1115. X    if (!ip->action)
  1116. X        ip->action = contool_filters_action_create(ip, ip->filter_controls);
  1117. X    if (!ip->filter_beep_count)
  1118. X        ip->filter_beep_count = contool_filters_filter_beep_count_create(ip, ip->filter_controls);
  1119. X    if (!ip->filter_beep_times)
  1120. X        ip->filter_beep_times = contool_filters_filter_beep_times_create(ip, ip->filter_controls);
  1121. X    if (!ip->filter_command)
  1122. X        ip->filter_command = contool_filters_filter_command_create(ip, ip->filter_controls);
  1123. X    if (!ip->filters_apply)
  1124. X        ip->filters_apply = contool_filters_filters_apply_create(ip, ip->filter_controls);
  1125. X    if (!ip->filters_reset)
  1126. X        ip->filters_reset = contool_filters_filters_reset_create(ip, ip->filter_controls);
  1127. X    return ip;
  1128. X}
  1129. X
  1130. X/*
  1131. X * Create object `filters' in the specified instance.
  1132. X
  1133. X */
  1134. XXv_opaque
  1135. Xcontool_filters_filters_create(ip, owner)
  1136. X    caddr_t        ip;
  1137. X    Xv_opaque    owner;
  1138. X{
  1139. X    extern void    filter_done();
  1140. X    Xv_opaque    obj;
  1141. X    
  1142. X    obj = xv_create(owner, FRAME_CMD,
  1143. X        XV_KEY_DATA, INSTANCE, ip,
  1144. X        XV_WIDTH, 510,
  1145. X        XV_HEIGHT, 620,
  1146. X        XV_LABEL, "Contool: Filters",
  1147. X        XV_SHOW, FALSE,
  1148. X        FRAME_SHOW_FOOTER, FALSE,
  1149. X        FRAME_SHOW_RESIZE_CORNER, FALSE,
  1150. X        FRAME_CMD_PUSHPIN_IN, FALSE,
  1151. X        FRAME_DONE_PROC, filter_done,
  1152. X        NULL);
  1153. X    xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
  1154. X    return obj;
  1155. X}
  1156. X
  1157. X/*
  1158. X * Create object `filter_controls' in the specified instance.
  1159. X
  1160. X */
  1161. XXv_opaque
  1162. Xcontool_filters_filter_controls_create(ip, owner)
  1163. X    caddr_t        ip;
  1164. X    Xv_opaque    owner;
  1165. X{
  1166. X    Xv_opaque    obj;
  1167. X    
  1168. X    obj = xv_create(owner, PANEL,
  1169. X        XV_KEY_DATA, INSTANCE, ip,
  1170. X        XV_HELP_DATA, "contool:filter_controls",
  1171. X        XV_X, 0,
  1172. X        XV_Y, 0,
  1173. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  1174. X        XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  1175. X        WIN_BORDER, FALSE,
  1176. X        NULL);
  1177. X    return obj;
  1178. X}
  1179. X
  1180. X/*
  1181. X * Create object `filter_list' in the specified instance.
  1182. X
  1183. X */
  1184. XXv_opaque
  1185. Xcontool_filters_filter_list_create(ip, owner)
  1186. X    caddr_t        ip;
  1187. X    Xv_opaque    owner;
  1188. X{
  1189. X    extern int        filter_notify();
  1190. X    Xv_opaque    obj;
  1191. X    
  1192. X    obj = xv_create(owner, PANEL_LIST,
  1193. X        XV_KEY_DATA, INSTANCE, ip,
  1194. X        XV_HELP_DATA, "contool:filter_list",
  1195. X        XV_X, 70,
  1196. X        XV_Y, 14,
  1197. X        PANEL_LIST_WIDTH, 350,
  1198. X        XV_HEIGHT, 200,
  1199. X        PANEL_LABEL_STRING, "Filters:",
  1200. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1201. X        PANEL_LIST_DISPLAY_ROWS, 10,
  1202. X        PANEL_READ_ONLY, TRUE,
  1203. X        PANEL_CHOOSE_ONE, FALSE,
  1204. X        PANEL_CHOOSE_NONE, TRUE,
  1205. X        PANEL_NOTIFY_PROC, filter_notify,
  1206. X        NULL);
  1207. X    return obj;
  1208. X}
  1209. X
  1210. X/*
  1211. X * Create object `filter_insert' in the specified instance.
  1212. X
  1213. X */
  1214. XXv_opaque
  1215. Xcontool_filters_filter_insert_create(ip, owner)
  1216. X    caddr_t        ip;
  1217. X    Xv_opaque    owner;
  1218. X{
  1219. X    Xv_opaque    obj;
  1220. X    
  1221. X    obj = xv_create(owner, PANEL_BUTTON,
  1222. X        XV_KEY_DATA, INSTANCE, ip,
  1223. X        XV_HELP_DATA, "contool:filter_insert",
  1224. X        XV_X, 126,
  1225. X        XV_Y, 218,
  1226. X        XV_WIDTH, 67,
  1227. X        XV_HEIGHT, 20,
  1228. X        PANEL_LABEL_STRING, "Insert",
  1229. X        PANEL_ITEM_MENU, contool_filter_insert_menu_create((caddr_t *) ip, NULL),
  1230. X        NULL);
  1231. X    return obj;
  1232. X}
  1233. X
  1234. X/*
  1235. X * Create object `filter_edit' in the specified instance.
  1236. X
  1237. X */
  1238. XXv_opaque
  1239. Xcontool_filters_filter_edit_create(ip, owner)
  1240. X    caddr_t        ip;
  1241. X    Xv_opaque    owner;
  1242. X{
  1243. X    Xv_opaque    obj;
  1244. X    
  1245. X    obj = xv_create(owner, PANEL_BUTTON,
  1246. X        XV_KEY_DATA, INSTANCE, ip,
  1247. X        XV_HELP_DATA, "contool:filter_edit",
  1248. X        XV_X, 202,
  1249. X        XV_Y, 218,
  1250. X        XV_WIDTH, 56,
  1251. X        XV_HEIGHT, 20,
  1252. X        PANEL_LABEL_STRING, "Edit",
  1253. X        PANEL_ITEM_MENU, contool_filter_edit_menu_create((caddr_t *) ip, NULL),
  1254. X        NULL);
  1255. X    return obj;
  1256. X}
  1257. X
  1258. X/*
  1259. X * Create object `filter_update' in the specified instance.
  1260. X
  1261. X */
  1262. XXv_opaque
  1263. Xcontool_filters_filter_update_create(ip, owner)
  1264. X    caddr_t        ip;
  1265. X    Xv_opaque    owner;
  1266. X{
  1267. X    extern void        filter_update();
  1268. X    Xv_opaque    obj;
  1269. X    
  1270. X    obj = xv_create(owner, PANEL_BUTTON,
  1271. X        XV_KEY_DATA, INSTANCE, ip,
  1272. X        XV_HELP_DATA, "contool:filter_update",
  1273. X        XV_X, 267,
  1274. X        XV_Y, 218,
  1275. X        XV_WIDTH, 62,
  1276. X        XV_HEIGHT, 20,
  1277. X        PANEL_LABEL_STRING, "Update",
  1278. X        PANEL_NOTIFY_PROC, filter_update,
  1279. X        NULL);
  1280. X    return obj;
  1281. X}
  1282. X
  1283. X/*
  1284. X * Create object `filter_type' in the specified instance.
  1285. X
  1286. X */
  1287. XXv_opaque
  1288. Xcontool_filters_filter_type_create(ip, owner)
  1289. X    caddr_t        ip;
  1290. X    Xv_opaque    owner;
  1291. X{
  1292. X    extern int        set_filter_type();
  1293. X    Xv_opaque    obj;
  1294. X    
  1295. X    obj = xv_create(owner, PANEL_CHOICE,
  1296. X        XV_KEY_DATA, INSTANCE, ip,
  1297. X        XV_HELP_DATA, "contool:filter_type",
  1298. X        XV_X, 80,
  1299. X        XV_Y, 259,
  1300. X        XV_WIDTH, 272,
  1301. X        XV_HEIGHT, 23,
  1302. X        PANEL_VALUE_X, 126,
  1303. X        PANEL_VALUE_Y, 259,
  1304. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1305. X        PANEL_CHOICE_NROWS, 1,
  1306. X        PANEL_LABEL_STRING, "Type:",
  1307. X        PANEL_NOTIFY_PROC, set_filter_type,
  1308. X        PANEL_CHOICE_STRINGS,
  1309. X            "Single line filter",
  1310. X            "Multi-line filter",
  1311. X            0,
  1312. X        NULL);
  1313. X    return obj;
  1314. X}
  1315. X
  1316. X/*
  1317. X * Create object `start' in the specified instance.
  1318. X
  1319. X */
  1320. XXv_opaque
  1321. Xcontool_filters_start_create(ip, owner)
  1322. X    caddr_t        ip;
  1323. X    Xv_opaque    owner;
  1324. X{
  1325. X    Xv_opaque    obj;
  1326. X    
  1327. X    obj = xv_create(owner, PANEL_TEXT,
  1328. X        XV_KEY_DATA, INSTANCE, ip,
  1329. X        XV_HELP_DATA, "contool:start",
  1330. X        XV_X, 65,
  1331. X        XV_Y, 303,
  1332. X        XV_WIDTH, 429,
  1333. X        XV_HEIGHT, 15,
  1334. X        PANEL_LABEL_STRING, "Pattern:",
  1335. X        PANEL_VALUE_X, 126,
  1336. X        PANEL_VALUE_Y, 303,
  1337. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1338. X        PANEL_VALUE_DISPLAY_LENGTH, 46,
  1339. X        PANEL_VALUE_STORED_LENGTH, 256,
  1340. X        PANEL_READ_ONLY, FALSE,
  1341. X        NULL);
  1342. X    return obj;
  1343. X}
  1344. X
  1345. X/*
  1346. X * Create object `stop' in the specified instance.
  1347. X
  1348. X */
  1349. XXv_opaque
  1350. Xcontool_filters_stop_create(ip, owner)
  1351. X    caddr_t        ip;
  1352. X    Xv_opaque    owner;
  1353. X{
  1354. X    Xv_opaque    obj;
  1355. X    
  1356. X    obj = xv_create(owner, PANEL_TEXT,
  1357. X        XV_KEY_DATA, INSTANCE, ip,
  1358. X        XV_HELP_DATA, "contool:stop",
  1359. X        XV_X, 35,
  1360. X        XV_Y, 323,
  1361. X        XV_WIDTH, 459,
  1362. X        XV_HEIGHT, 15,
  1363. X        PANEL_LABEL_STRING, "End pattern:",
  1364. X        PANEL_VALUE_X, 126,
  1365. X        PANEL_VALUE_Y, 323,
  1366. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1367. X        PANEL_VALUE_DISPLAY_LENGTH, 46,
  1368. X        PANEL_VALUE_STORED_LENGTH, 256,
  1369. X        PANEL_READ_ONLY, FALSE,
  1370. X        NULL);
  1371. X    return obj;
  1372. X}
  1373. X
  1374. X/*
  1375. X * Create object `comment' in the specified instance.
  1376. X
  1377. X */
  1378. XXv_opaque
  1379. Xcontool_filters_comment_create(ip, owner)
  1380. X    caddr_t        ip;
  1381. X    Xv_opaque    owner;
  1382. X{
  1383. X    Xv_opaque    obj;
  1384. X    
  1385. X    obj = xv_create(owner, PANEL_TEXT,
  1386. X        XV_KEY_DATA, INSTANCE, ip,
  1387. X        XV_HELP_DATA, "contool:comment",
  1388. X        XV_X, 49,
  1389. X        XV_Y, 359,
  1390. X        XV_WIDTH, 445,
  1391. X        XV_HEIGHT, 15,
  1392. X        PANEL_LABEL_STRING, "Comment:",
  1393. X        PANEL_VALUE_X, 126,
  1394. X        PANEL_VALUE_Y, 359,
  1395. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1396. X        PANEL_VALUE_DISPLAY_LENGTH, 46,
  1397. X        PANEL_VALUE_STORED_LENGTH, 256,
  1398. X        PANEL_READ_ONLY, FALSE,
  1399. X        NULL);
  1400. X    return obj;
  1401. X}
  1402. X
  1403. X/*
  1404. X * Create object `ignore' in the specified instance.
  1405. X
  1406. X */
  1407. XXv_opaque
  1408. Xcontool_filters_ignore_create(ip, owner)
  1409. X    caddr_t        ip;
  1410. X    Xv_opaque    owner;
  1411. X{
  1412. X    extern int        set_filter_action();
  1413. X    Xv_opaque    obj;
  1414. X    
  1415. X    obj = xv_create(owner, PANEL_CHOICE,
  1416. X        XV_KEY_DATA, INSTANCE, ip,
  1417. X        XV_HELP_DATA, "contool:ignore",
  1418. X        XV_X, 14,
  1419. X        XV_Y, 395,
  1420. X        XV_WIDTH, 321,
  1421. X        XV_HEIGHT, 23,
  1422. X        PANEL_VALUE_X, 126,
  1423. X        PANEL_VALUE_Y, 395,
  1424. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1425. X        PANEL_CHOICE_NROWS, 1,
  1426. X        PANEL_LABEL_STRING, "When matched:",
  1427. X        PANEL_NOTIFY_PROC, set_filter_action,
  1428. X        PANEL_CHOICE_STRINGS,
  1429. X            "Save message",
  1430. X            "Ignore message",
  1431. X            0,
  1432. X        NULL);
  1433. X    return obj;
  1434. X}
  1435. X
  1436. X/*
  1437. X * Create object `action' in the specified instance.
  1438. X
  1439. X */
  1440. XXv_opaque
  1441. Xcontool_filters_action_create(ip, owner)
  1442. X    caddr_t        ip;
  1443. X    Xv_opaque    owner;
  1444. X{
  1445. X    extern int        set_match_action();
  1446. X    Xv_opaque    obj;
  1447. X    
  1448. X    obj = xv_create(owner, PANEL_TOGGLE,
  1449. X        XV_KEY_DATA, INSTANCE, ip,
  1450. X        XV_HELP_DATA, "contool:action",
  1451. X        XV_X, 32,
  1452. X        XV_Y, 423,
  1453. X        XV_WIDTH, 196,
  1454. X        XV_HEIGHT, 139,
  1455. X        PANEL_VALUE_X, 126,
  1456. X        PANEL_VALUE_Y, 423,
  1457. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1458. X        PANEL_CHOICE_NCOLS, 1,
  1459. X        PANEL_LABEL_STRING, "When saved:",
  1460. X        PANEL_NOTIFY_PROC, set_match_action,
  1461. X        PANEL_CHOICE_STRINGS,
  1462. X            "Beep",
  1463. X            "Command",
  1464. X            "Flash icon",
  1465. X            "Open window",
  1466. X            "Timestamp",
  1467. X            0,
  1468. X        NULL);
  1469. X    return obj;
  1470. X}
  1471. X
  1472. X/*
  1473. X * Create object `filter_beep_count' in the specified instance.
  1474. X
  1475. X */
  1476. XXv_opaque
  1477. Xcontool_filters_filter_beep_count_create(ip, owner)
  1478. X    caddr_t        ip;
  1479. X    Xv_opaque    owner;
  1480. X{
  1481. X    Xv_opaque    obj;
  1482. X    
  1483. X    obj = xv_create(owner, PANEL_NUMERIC_TEXT,
  1484. X        XV_KEY_DATA, INSTANCE, ip,
  1485. X        XV_HELP_DATA, "contool:filter_beep_count",
  1486. X        XV_X, 228,
  1487. X        XV_Y, 428,
  1488. X        XV_WIDTH, 80,
  1489. X        XV_HEIGHT, 15,
  1490. X        PANEL_VALUE_X, 237,
  1491. X        PANEL_VALUE_Y, 428,
  1492. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1493. X        PANEL_VALUE_DISPLAY_LENGTH, 2,
  1494. X        PANEL_VALUE_STORED_LENGTH, 2,
  1495. X        PANEL_MAX_VALUE, 99,
  1496. X        PANEL_MIN_VALUE, 0,
  1497. X        PANEL_READ_ONLY, FALSE,
  1498. X        NULL);
  1499. X    return obj;
  1500. X}
  1501. X
  1502. X/*
  1503. X * Create object `filter_beep_times' in the specified instance.
  1504. X
  1505. X */
  1506. XXv_opaque
  1507. Xcontool_filters_filter_beep_times_create(ip, owner)
  1508. X    caddr_t        ip;
  1509. X    Xv_opaque    owner;
  1510. X{
  1511. X    Xv_opaque    obj;
  1512. X    
  1513. X    obj = xv_create(owner, PANEL_MESSAGE,
  1514. X        XV_KEY_DATA, INSTANCE, ip,
  1515. X        XV_HELP_DATA, "contool:filter_beep_times",
  1516. X        XV_X, 316,
  1517. X        XV_Y, 428,
  1518. X        XV_WIDTH, 34,
  1519. X        XV_HEIGHT, 13,
  1520. X        PANEL_LABEL_STRING, "times",
  1521. X        PANEL_LABEL_BOLD, FALSE,
  1522. X        NULL);
  1523. X    return obj;
  1524. X}
  1525. X
  1526. X/*
  1527. X * Create object `filter_command' in the specified instance.
  1528. X
  1529. X */
  1530. XXv_opaque
  1531. Xcontool_filters_filter_command_create(ip, owner)
  1532. X    caddr_t        ip;
  1533. X    Xv_opaque    owner;
  1534. X{
  1535. X    Xv_opaque    obj;
  1536. X    
  1537. X    obj = xv_create(owner, PANEL_TEXT,
  1538. X        XV_KEY_DATA, INSTANCE, ip,
  1539. X        XV_HELP_DATA, "contool:filter_command",
  1540. X        XV_X, 228,
  1541. X        XV_Y, 457,
  1542. X        XV_WIDTH, 265,
  1543. X        XV_HEIGHT, 15,
  1544. X        PANEL_VALUE_X, 237,
  1545. X        PANEL_VALUE_Y, 457,
  1546. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1547. X        PANEL_VALUE_DISPLAY_LENGTH, 32,
  1548. X        PANEL_VALUE_STORED_LENGTH, 1024,
  1549. X        PANEL_READ_ONLY, FALSE,
  1550. X        NULL);
  1551. X    return obj;
  1552. X}
  1553. X
  1554. X/*
  1555. X * Create object `filters_apply' in the specified instance.
  1556. X
  1557. X */
  1558. XXv_opaque
  1559. Xcontool_filters_filters_apply_create(ip, owner)
  1560. X    caddr_t        ip;
  1561. X    Xv_opaque    owner;
  1562. X{
  1563. X    extern void        accept_filters();
  1564. X    Xv_opaque    obj;
  1565. X    
  1566. X    obj = xv_create(owner, PANEL_BUTTON,
  1567. X        XV_KEY_DATA, INSTANCE, ip,
  1568. X        XV_HELP_DATA, "contool:filters_apply",
  1569. X        XV_X, 196,
  1570. X        XV_Y, 583,
  1571. X        XV_WIDTH, 53,
  1572. X        XV_HEIGHT, 20,
  1573. X        PANEL_LABEL_STRING, "Apply",
  1574. X        PANEL_NOTIFY_PROC, accept_filters,
  1575. X        NULL);
  1576. X    return obj;
  1577. X}
  1578. X
  1579. X/*
  1580. X * Create object `filters_reset' in the specified instance.
  1581. X
  1582. X */
  1583. XXv_opaque
  1584. Xcontool_filters_filters_reset_create(ip, owner)
  1585. X    caddr_t        ip;
  1586. X    Xv_opaque    owner;
  1587. X{
  1588. X    extern void        reset_filters();
  1589. X    Xv_opaque    obj;
  1590. X    
  1591. X    obj = xv_create(owner, PANEL_BUTTON,
  1592. X        XV_KEY_DATA, INSTANCE, ip,
  1593. X        XV_HELP_DATA, "contool:filters_reset",
  1594. X        XV_X, 261,
  1595. X        XV_Y, 583,
  1596. X        XV_WIDTH, 51,
  1597. X        XV_HEIGHT, 20,
  1598. X        PANEL_LABEL_STRING, "Reset",
  1599. X        PANEL_NOTIFY_PROC, reset_filters,
  1600. X        NULL);
  1601. X    return obj;
  1602. X}
  1603. X
  1604. X/*
  1605. X * Initialize an instance of object `load'.
  1606. X */
  1607. Xcontool_load_objects *
  1608. Xcontool_load_objects_initialize(ip, owner)
  1609. X    contool_load_objects    *ip;
  1610. X    Xv_opaque    owner;
  1611. X{
  1612. X    if (!ip && !(ip = (contool_load_objects *) calloc(1, sizeof (contool_load_objects))))
  1613. X        return (contool_load_objects *) NULL;
  1614. X    if (!ip->load)
  1615. X        ip->load = contool_load_load_create(ip, owner);
  1616. X    if (!ip->load_controls)
  1617. X        ip->load_controls = contool_load_load_controls_create(ip, ip->load);
  1618. X    if (!ip->load_type)
  1619. X        ip->load_type = contool_load_load_type_create(ip, ip->load_controls);
  1620. X    if (!ip->load_file)
  1621. X        ip->load_file = contool_load_load_file_create(ip, ip->load_controls);
  1622. X    if (!ip->accept_load)
  1623. X        ip->accept_load = contool_load_accept_load_create(ip, ip->load_controls);
  1624. X    return ip;
  1625. X}
  1626. X
  1627. X/*
  1628. X * Create object `load' in the specified instance.
  1629. X
  1630. X */
  1631. XXv_opaque
  1632. Xcontool_load_load_create(ip, owner)
  1633. X    caddr_t        ip;
  1634. X    Xv_opaque    owner;
  1635. X{
  1636. X    Xv_opaque    obj;
  1637. X    
  1638. X    obj = xv_create(owner, FRAME_CMD,
  1639. X        XV_KEY_DATA, INSTANCE, ip,
  1640. X        XV_WIDTH, 444,
  1641. X        XV_HEIGHT, 146,
  1642. X        XV_LABEL, "Contool: Load Configuration",
  1643. X        XV_SHOW, FALSE,
  1644. X        FRAME_SHOW_FOOTER, FALSE,
  1645. X        FRAME_SHOW_RESIZE_CORNER, FALSE,
  1646. X        FRAME_CMD_PUSHPIN_IN, FALSE,
  1647. X        NULL);
  1648. X    xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
  1649. X    return obj;
  1650. X}
  1651. X
  1652. X/*
  1653. X * Create object `load_controls' in the specified instance.
  1654. X
  1655. X */
  1656. XXv_opaque
  1657. Xcontool_load_load_controls_create(ip, owner)
  1658. X    caddr_t        ip;
  1659. X    Xv_opaque    owner;
  1660. X{
  1661. X    Xv_opaque    obj;
  1662. X    
  1663. X    obj = xv_create(owner, PANEL,
  1664. X        XV_KEY_DATA, INSTANCE, ip,
  1665. X        XV_HELP_DATA, "contool:load_controls",
  1666. X        XV_X, 0,
  1667. X        XV_Y, 0,
  1668. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  1669. X        XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  1670. X        WIN_BORDER, FALSE,
  1671. X        NULL);
  1672. X    return obj;
  1673. X}
  1674. X
  1675. X/*
  1676. X * Create object `load_type' in the specified instance.
  1677. X
  1678. X */
  1679. XXv_opaque
  1680. Xcontool_load_load_type_create(ip, owner)
  1681. X    caddr_t        ip;
  1682. X    Xv_opaque    owner;
  1683. X{
  1684. X    Xv_opaque    obj;
  1685. X    
  1686. X    obj = xv_create(owner, PANEL_TOGGLE,
  1687. X        XV_KEY_DATA, INSTANCE, ip,
  1688. X        XV_HELP_DATA, "contool:load_type",
  1689. X        XV_X, 105,
  1690. X        XV_Y, 14,
  1691. X        XV_WIDTH, 162,
  1692. X        XV_HEIGHT, 52,
  1693. X        PANEL_VALUE_X, 149,
  1694. X        PANEL_VALUE_Y, 14,
  1695. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1696. X        PANEL_CHOICE_NCOLS, 1,
  1697. X        PANEL_LABEL_STRING, "Load:",
  1698. X        PANEL_CHOICE_STRINGS,
  1699. X            "Tool properties",
  1700. X            "Filter definitions",
  1701. X            0,
  1702. X        NULL);
  1703. X    return obj;
  1704. X}
  1705. X
  1706. X/*
  1707. X * Create object `load_file' in the specified instance.
  1708. X
  1709. X */
  1710. XXv_opaque
  1711. Xcontool_load_load_file_create(ip, owner)
  1712. X    caddr_t        ip;
  1713. X    Xv_opaque    owner;
  1714. X{
  1715. X    extern Panel_setting    file_completion();
  1716. X    Xv_opaque    obj;
  1717. X    
  1718. X    obj = xv_create(owner, PANEL_TEXT,
  1719. X        XV_KEY_DATA, INSTANCE, ip,
  1720. X        XV_HELP_DATA, "contool:load_file",
  1721. X        XV_X, 14,
  1722. X        XV_Y, 72,
  1723. X        XV_WIDTH, 415,
  1724. X        XV_HEIGHT, 15,
  1725. X        PANEL_LABEL_STRING, "Configuration file:",
  1726. X        PANEL_VALUE_X, 149,
  1727. X        PANEL_VALUE_Y, 72,
  1728. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1729. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  1730. X        PANEL_VALUE_STORED_LENGTH, 256,
  1731. X        PANEL_READ_ONLY, FALSE,
  1732. X        PANEL_NOTIFY_PROC, file_completion,
  1733. X        NULL);
  1734. X    return obj;
  1735. X}
  1736. X
  1737. X/*
  1738. X * Create object `accept_load' in the specified instance.
  1739. X
  1740. X */
  1741. XXv_opaque
  1742. Xcontool_load_accept_load_create(ip, owner)
  1743. X    caddr_t        ip;
  1744. X    Xv_opaque    owner;
  1745. X{
  1746. X    extern void        load_filters();
  1747. X    Xv_opaque    obj;
  1748. X    
  1749. X    obj = xv_create(owner, PANEL_BUTTON,
  1750. X        XV_KEY_DATA, INSTANCE, ip,
  1751. X        XV_HELP_DATA, "contool:accept_load",
  1752. X        XV_X, 199,
  1753. X        XV_Y, 107,
  1754. X        XV_WIDTH, 46,
  1755. X        XV_HEIGHT, 20,
  1756. X        PANEL_LABEL_STRING, "Load",
  1757. X        PANEL_NOTIFY_PROC, load_filters,
  1758. X        NULL);
  1759. X    return obj;
  1760. X}
  1761. X
  1762. X/*
  1763. X * Initialize an instance of object `store'.
  1764. X */
  1765. Xcontool_store_objects *
  1766. Xcontool_store_objects_initialize(ip, owner)
  1767. X    contool_store_objects    *ip;
  1768. X    Xv_opaque    owner;
  1769. X{
  1770. X    if (!ip && !(ip = (contool_store_objects *) calloc(1, sizeof (contool_store_objects))))
  1771. X        return (contool_store_objects *) NULL;
  1772. X    if (!ip->store)
  1773. X        ip->store = contool_store_store_create(ip, owner);
  1774. X    if (!ip->store_controls)
  1775. X        ip->store_controls = contool_store_store_controls_create(ip, ip->store);
  1776. X    if (!ip->store_type)
  1777. X        ip->store_type = contool_store_store_type_create(ip, ip->store_controls);
  1778. X    if (!ip->store_file)
  1779. X        ip->store_file = contool_store_store_file_create(ip, ip->store_controls);
  1780. X    if (!ip->accept_store)
  1781. X        ip->accept_store = contool_store_accept_store_create(ip, ip->store_controls);
  1782. X    return ip;
  1783. X}
  1784. X
  1785. X/*
  1786. X * Create object `store' in the specified instance.
  1787. X
  1788. X */
  1789. XXv_opaque
  1790. Xcontool_store_store_create(ip, owner)
  1791. X    caddr_t        ip;
  1792. X    Xv_opaque    owner;
  1793. X{
  1794. X    Xv_opaque    obj;
  1795. X    
  1796. X    obj = xv_create(owner, FRAME_CMD,
  1797. X        XV_KEY_DATA, INSTANCE, ip,
  1798. X        XV_WIDTH, 444,
  1799. X        XV_HEIGHT, 146,
  1800. X        XV_LABEL, "Contool: Store Configuration",
  1801. X        XV_SHOW, FALSE,
  1802. X        FRAME_SHOW_FOOTER, FALSE,
  1803. X        FRAME_SHOW_RESIZE_CORNER, FALSE,
  1804. X        FRAME_CMD_PUSHPIN_IN, FALSE,
  1805. X        NULL);
  1806. X    xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
  1807. X    return obj;
  1808. X}
  1809. X
  1810. X/*
  1811. X * Create object `store_controls' in the specified instance.
  1812. X
  1813. X */
  1814. XXv_opaque
  1815. Xcontool_store_store_controls_create(ip, owner)
  1816. X    caddr_t        ip;
  1817. X    Xv_opaque    owner;
  1818. X{
  1819. X    Xv_opaque    obj;
  1820. X    
  1821. X    obj = xv_create(owner, PANEL,
  1822. X        XV_KEY_DATA, INSTANCE, ip,
  1823. X        XV_HELP_DATA, "contool:store_controls",
  1824. X        XV_X, 0,
  1825. X        XV_Y, 0,
  1826. X        XV_WIDTH, WIN_EXTEND_TO_EDGE,
  1827. X        XV_HEIGHT, WIN_EXTEND_TO_EDGE,
  1828. X        WIN_BORDER, FALSE,
  1829. X        NULL);
  1830. X    return obj;
  1831. X}
  1832. X
  1833. X/*
  1834. X * Create object `store_type' in the specified instance.
  1835. X
  1836. X */
  1837. XXv_opaque
  1838. Xcontool_store_store_type_create(ip, owner)
  1839. X    caddr_t        ip;
  1840. X    Xv_opaque    owner;
  1841. X{
  1842. X    Xv_opaque    obj;
  1843. X    
  1844. X    obj = xv_create(owner, PANEL_TOGGLE,
  1845. X        XV_KEY_DATA, INSTANCE, ip,
  1846. X        XV_HELP_DATA, "contool:store_type",
  1847. X        XV_X, 102,
  1848. X        XV_Y, 14,
  1849. X        XV_WIDTH, 165,
  1850. X        XV_HEIGHT, 52,
  1851. X        PANEL_VALUE_X, 149,
  1852. X        PANEL_VALUE_Y, 14,
  1853. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1854. X        PANEL_CHOICE_NCOLS, 1,
  1855. X        PANEL_LABEL_STRING, "Store:",
  1856. X        PANEL_CHOICE_STRINGS,
  1857. X            "Tool properties",
  1858. X            "Filter definitions",
  1859. X            0,
  1860. X        NULL);
  1861. X    return obj;
  1862. X}
  1863. X
  1864. X/*
  1865. X * Create object `store_file' in the specified instance.
  1866. X
  1867. X */
  1868. XXv_opaque
  1869. Xcontool_store_store_file_create(ip, owner)
  1870. X    caddr_t        ip;
  1871. X    Xv_opaque    owner;
  1872. X{
  1873. X    extern Panel_setting    file_completion();
  1874. X    Xv_opaque    obj;
  1875. X    
  1876. X    obj = xv_create(owner, PANEL_TEXT,
  1877. X        XV_KEY_DATA, INSTANCE, ip,
  1878. X        XV_HELP_DATA, "contool:store_file",
  1879. X        XV_X, 14,
  1880. X        XV_Y, 72,
  1881. X        XV_WIDTH, 415,
  1882. X        XV_HEIGHT, 15,
  1883. X        PANEL_LABEL_STRING, "Configuration file:",
  1884. X        PANEL_VALUE_X, 149,
  1885. X        PANEL_VALUE_Y, 72,
  1886. X        PANEL_LAYOUT, PANEL_HORIZONTAL,
  1887. X        PANEL_VALUE_DISPLAY_LENGTH, 35,
  1888. X        PANEL_VALUE_STORED_LENGTH, 256,
  1889. X        PANEL_READ_ONLY, FALSE,
  1890. X        PANEL_NOTIFY_PROC, file_completion,
  1891. X        NULL);
  1892. X    return obj;
  1893. X}
  1894. X
  1895. X/*
  1896. X * Create object `accept_store' in the specified instance.
  1897. X
  1898. X */
  1899. XXv_opaque
  1900. Xcontool_store_accept_store_create(ip, owner)
  1901. X    caddr_t        ip;
  1902. X    Xv_opaque    owner;
  1903. X{
  1904. X    extern void        store_filters();
  1905. X    Xv_opaque    obj;
  1906. X    
  1907. X    obj = xv_create(owner, PANEL_BUTTON,
  1908. X        XV_KEY_DATA, INSTANCE, ip,
  1909. X        XV_HELP_DATA, "contool:accept_store",
  1910. X        XV_X, 197,
  1911. X        XV_Y, 107,
  1912. X        XV_WIDTH, 49,
  1913. X        XV_HEIGHT, 20,
  1914. X        PANEL_LABEL_STRING, "Store",
  1915. X        PANEL_NOTIFY_PROC, store_filters,
  1916. X        NULL);
  1917. X    return obj;
  1918. X}
  1919. X
  1920. END_OF_FILE
  1921. if test 40450 -ne `wc -c <'contool_ui.c'`; then
  1922.     echo shar: \"'contool_ui.c'\" unpacked with wrong size!
  1923. fi
  1924. # end of 'contool_ui.c'
  1925. fi
  1926. echo shar: End of archive 6 \(of 6\).
  1927. cp /dev/null ark6isdone
  1928. MISSING=""
  1929. for I in 1 2 3 4 5 6 ; do
  1930.     if test ! -f ark${I}isdone ; then
  1931.     MISSING="${MISSING} ${I}"
  1932.     fi
  1933. done
  1934. if test "${MISSING}" = "" ; then
  1935.     echo You have unpacked all 6 archives.
  1936.     rm -f ark[1-9]isdone
  1937. else
  1938.     echo You still need to unpack the following archives:
  1939.     echo "        " ${MISSING}
  1940. fi
  1941. ##  End of shell archive.
  1942. exit 0
  1943.  
  1944. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  1945. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  1946. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  1947. Melbourne, FL 32902            FAX   : (407) 727-{5118,5227,4004}
  1948.  
  1949. I'm glad you asked, son.  Being popular
  1950.     is the most important thing in the world.    -- Homer Simpson
  1951.